require('dotenv').config()
const koa = require('koa')
const logger = require('koa-logger')
const v1 = require('./api/v1')

var app = koa()

app.use(logger())

app.use(v1.routes())

app.use(function *() {
  this.body = 'Hello World'
})

const port = 3000
app.listen(port, () => {
  console.log(`Server is running at port ${port}`)
})